<template>
	<w-menu :snap="target">
	  <w-button text="新建" @click="create"></w-button>
	  <w-button text="删除" @click="remove"></w-button>
	</w-menu>
</template>

<script>
	export default {
		props: ['data', 'target'],
		methods: {
			create() {
			  console.log(this.data.id) //打印树节点的id
			},
			remove() {
			  console.log(this.data.text) //打印树节点的文本
			}
		}
	}
</script>

<style>
</style>